LAMMPS (3 Nov 2022)
# electrodes with constant potential using finite field
# for z-periodic graphene-ionic liquid supercapacitor

boundary p p p # ffield uses periodic z-boundary and no slab
include settings.mod # styles, groups, computes and fixes
# set boundary in main script because ffield is periodic
units real
# distribute electrode atoms among all processors:
if "$(extract_setting(world_size) % 2) == 0" then "processors * * 2"
processors * * 2

atom_style full
pair_style lj/cut/coul/long 16
bond_style harmonic
angle_style harmonic
kspace_style pppm/electrode 1e-7
# kspace_modify in main script because ffield is periodic

read_data "data.graph-il"
Reading data file ...
  orthogonal box = (0 0 -68) to (32.2 34.4 68)
  1 by 2 by 2 MPI processor grid
  reading atoms ...
  3776 atoms
  scanning bonds ...
  2 = max bonds/atom
  scanning angles ...
  1 = max angles/atom
  reading bonds ...
  640 bonds
  reading angles ...
  320 angles
Finding 1-2 1-3 1-4 neighbors ...
  special bond factors lj:    0        0        0       
  special bond factors coul:  0        0        0       
     2 = max # of 1-2 neighbors
     1 = max # of 1-3 neighbors
     1 = max # of 1-4 neighbors
     2 = max # of special neighbors
  special bonds CPU = 0.002 seconds
  read_data CPU = 0.033 seconds

# replicate 4 4 1 # test different sys sizes

variable zpos atom "z > 0"
group zpos variable zpos
1891 atoms in group zpos
group ele type 5
832 atoms in group ele
group top intersect ele zpos
416 atoms in group top
group bot subtract ele top
416 atoms in group bot

group bmi type 1 2 3
960 atoms in group bmi
group electrolyte type 1 2 3 4
1280 atoms in group electrolyte

fix nvt electrolyte nvt temp 500.0 500.0 100
fix shake bmi shake 1e-4 20 0 b 1 2 a 1
Finding SHAKE clusters ...
       0 = # of size 2 clusters
       0 = # of size 3 clusters
       0 = # of size 4 clusters
     320 = # of frozen angles
  find clusters CPU = 0.002 seconds

variable q atom q
compute qtop top reduce sum v_q
compute qbot bot reduce sum v_q
compute ctemp electrolyte temp

fix conp bot electrode/conp -1.0 1.979 couple top 1.0 symm on etypes on ffield yes
832 atoms in group conp_group

thermo 50
thermo_style custom step temp c_ctemp epair etotal c_qbot c_qtop
run 500

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

Your simulation uses code contributions which should be cited:

- kspace_style pppm/electrode command:

@article{Ahrens2021,
author = {Ahrens-Iwers, Ludwig J.V. and Mei{\ss}ner, Robert H.},
doi = {10.1063/5.0063381},
title = {{Constant potential simulations on a mesh}},
journal = {Journal of Chemical Physics},
year = {2021}
volume = {155},
pages = {104104},
}
- fix electrode command:

@article{Ahrens2022
author = {Ahrens-Iwers, Ludwig J.V. and Janssen, Mahijs and Tee, Shern R. and Mei{\ss}ner, Robert H.},
doi = {10.1063/5.0099239},
title = {{ELECTRODE: An electrochemistry package for LAMMPS}},
journal = {The Journal of Chemical Physics},
year = {2022}
volume = {157},
pages = {084801},
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

PPPM/electrode initialization ...
  using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
  G vector (1/distance) = 0.20949995
  grid = 32 32 90
  stencil order = 5
  estimated absolute RMS force accuracy = 3.5014341e-05
  estimated relative force accuracy = 1.0544465e-07
  using double precision MKL FFT
  3d grid and FFT values/proc = 46644 23552
Generated 15 of 15 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
  update: every = 1 steps, delay = 0 steps, check = yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 18
  ghost atom cutoff = 18
  binsize = 9, bins = 4 4 16
  3 neighbor lists, perpetual/occasional/extra = 2 1 0
  (1) pair lj/cut/coul/long, perpetual
      attributes: half, newton on
      pair build: half/bin/newton
      stencil: half/bin/3d
      bin: standard
  (2) fix electrode/conp, occasional, skip from (1)
      attributes: half, newton on
      pair build: skip
      stencil: none
      bin: none
  (3) fix electrode/conp, perpetual, skip from (1)
      attributes: half, newton on
      pair build: skip
      stencil: none
      bin: none
Per MPI rank memory allocation (min/avg/max) = 21.23 | 21.34 | 21.65 Mbytes
   Step          Temp         c_ctemp         E_pair         TotEng         c_qbot         c_qtop    
         0   0              0              25137186       25137186       0.0085209384  -0.0085209384 
        50   17.837642      64.263873      25137027       25137210       0.0045513522  -0.0045513522 
       100   48.393984      174.34955      25136771       25137270      -0.0097291786   0.0097291786 
       150   70.421823      253.70949      25136653       25137378      -0.033522793    0.033522793  
       200   82.205535      296.1628       25136667       25137513      -0.064555648    0.064555648  
       250   87.542843      315.39158      25136758       25137660      -0.098075546    0.098075546  
       300   91.705733      330.38927      25136868       25137812      -0.13006751     0.13006751   
       350   100.36128      361.5727       25136938       25137971      -0.15852814     0.15852814   
       400   111.37586      401.25505      25136990       25138137      -0.18297207     0.18297207   
       450   121.79814      438.80351      25137049       25138303      -0.2023394      0.2023394    
       500   126.95882      457.39597      25137151       25138459      -0.21305221     0.21305221   
Loop time of 26.2807 on 4 procs for 500 steps with 3776 atoms

Performance: 1.644 ns/day, 14.600 hours/ns, 19.025 timesteps/s, 71.840 katom-step/s
83.1% CPU use with 4 MPI tasks x no OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 5.8233     | 6.1941     | 6.6294     |  12.1 | 23.57
Bond    | 0.0010807  | 0.0011705  | 0.0013494  |   0.3 |  0.00
Kspace  | 8.0325     | 8.4703     | 8.8457     |  10.4 | 32.23
Neigh   | 0.14184    | 0.1421     | 0.14238    |   0.1 |  0.54
Comm    | 0.52248    | 0.54323    | 0.56352    |   2.7 |  2.07
Output  | 0.00079782 | 0.0011547  | 0.0021987  |   1.8 |  0.00
Modify  | 10.831     | 10.856     | 10.881     |   0.7 | 41.31
Other   |            | 0.07293    |            |       |  0.28

Nlocal:            944 ave         951 max         941 min
Histogram: 1 2 0 0 0 0 0 0 0 1
Nghost:        10122.8 ave       10136 max       10101 min
Histogram: 1 0 0 0 0 0 1 0 1 1
Neighs:         465923 ave      510116 max      422901 min
Histogram: 1 0 1 0 0 0 0 1 0 1

Total # of neighbors = 1863691
Ave neighs/atom = 493.56224
Ave special neighs/atom = 0.50847458
Neighbor list builds = 7
Dangerous builds = 0
Total wall time: 0:00:32
